#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
    int maxArea(vector<int>& height) {
        int size = height.size();
        cout << size << endl;
        int left = 0, right = size - 1;
        int max = 0;
        while (left < right)
        {
            int area = (right - left) * (height[left] < height[right] ? height[left] : height[right]);
            max = (max > area ? max : area);
            if (height[left] > height[right]) right--;
            else if (height[left] <= height[right])left++;
        }
        return max;
    }
};
